import 'package:binggo_bomb/demo/DemoSon.dart';
import 'package:binggo_bomb/utils/localStorage.dart';
import 'package:flutter/material.dart';

class DemoOne extends StatefulWidget {
  const DemoOne({super.key});

  @override
  State<DemoOne> createState() => _DemoOneState();
}

class _DemoOneState extends State<DemoOne> {

  GlobalKey<DemoSonState> sonState = GlobalKey<DemoSonState>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('工具', style: TextStyle(color: Colors.black87),),
        backgroundColor: Colors.transparent,
        elevation: 0.0,
        centerTitle: true,
      ),
      body: Container(
        padding: EdgeInsets.all(12.0),
        // color: Colors.blue,
        child: Column(
          children: [
            // DemoSon(key: sonState,),
            // SizedBox(height: 10,),
            // ElevatedButton(
            //     onPressed: () {
            //       sonState.currentState?.changeName("西安${DateTime.now().microsecondsSinceEpoch}");
            //     },
            //     child: Text("点我")
            // ),
            // SizedBox(height: 10,),
            ElevatedButton(
                onPressed: () {
                  LocalStorage.clearAll();
                  // LocalStorage.set('pinkCards', {});/// "红色"
                  // LocalStorage.set('blueCards', {});/// "蓝色"
                  // LocalStorage.set('yellowCards', {});/// "黄色"
                  // LocalStorage.set('purpleCards', {});/// "紫色"
                },
                child: Text("清理缓存")
            )


          ],
        ),
      ),
    );
  }
}
